<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8" />
</head>

<body>
    <div>
        <script src="https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/tex-svg.js"></script>
        {% if remote_plotly_js -%}
        <script src="https://cdn.plot.ly/plotly-2.12.1.min.js"></script>
        {% else -%}
        <script type="text/javascript">{% include "plotly.min.js" %}</script>
        {% endif -%}

        <div id="plotly-html-element" class="plotly-graph-div" style="height:100%; width:100%;"></div>

        <script type="module">
            const graph_div = document.getElementById("plotly-html-element");
            await Plotly.newPlot(graph_div, {{ plot| tojson | safe }});
        </script>
    </div>
</body>

</html>